package by.hatton.engine.bo;

import android.os.Bundle;
import android.os.ResultReceiver;

public class BaseRequestDataWrapper {

	private static final String REQUEST_ID = "request_id";
	private static final String RESULT_RECEIVER = "result_receiver";
	private static final String PROCESSOR_ID = "processor_id";
	private static final String REQUEST_SPECIFIC_DATA = "request_specific_data";

	private Bundle mData;

	public BaseRequestDataWrapper() {
		mData = new Bundle();
	}

	public BaseRequestDataWrapper(Bundle bundle) {
		mData = bundle;
	}

	public long getRequestId() {
		return mData.getLong(REQUEST_ID);
	}

	public void setRequestId(long id) {
		mData.putLong(REQUEST_ID, id);
	}

	public ResultReceiver getResultReceiver() {
		return (ResultReceiver) mData.getSerializable(RESULT_RECEIVER);
	}

	public void setResultReceiver(ResultReceiver resultReceiver) {
		mData.putParcelable(RESULT_RECEIVER, resultReceiver);
	}

	public long getProcessorId() {
		return mData.getLong(PROCESSOR_ID);
	}

	public void setProcessorId(long id) {
		mData.putLong(PROCESSOR_ID, id);
	}

	public Bundle getRequestSpecificData() {
		return mData.getBundle(REQUEST_SPECIFIC_DATA);
	}

	public void setRequestSpecificData(Bundle data) {
		mData.putBundle(REQUEST_SPECIFIC_DATA, data);
	}

	public Bundle getData() {
		return mData;
	}

	public void setData(Bundle data) {
		mData = data;
	}

}
